import request from '@/utils/request'

// export const loginApi = (form) => {
//   return request.post('/auth/login', form)
// }
// export const loginApi = ({ username, password }) => {
//   return request.post('/auth/login', {
//     username,
//     password
//   })
// }
/**
 * 登录接口
 */
export const loginApi = (form) => {
  return request.post('/auth/login', {
    username: form.username,
    password: form.password
  })
}

/**
 * 获取用户信息
 */
export const getUserInfoApi = () => {
  return request.get('/auth/currentUser')
}
